﻿/* 
 * Entity class for the $MetricsTransactions[Blob|Queue|Table] tables defined by Azure
 */
// Source: http://blogs.msdn.com/b/windowsazurestorage/archive/2011/08/03/windows-azure-storage-metrics-using-metrics-to-track-storage-usage.aspx
using System.Data.Services.Common;

namespace AMT.Azure.Storage
{
	[DataServiceKey("PartitionKey", "RowKey")]
	public class MetricsTransactionsEntity
	{
		// Version designator for this class and its descendants
		public readonly float Version = 1.0F;

		public string PartitionKey { get; set; }
		public string RowKey { get; set; }
		public long TotalIngress { get; set; }
		public long TotalEgress { get; set; }
		public long TotalRequests { get; set; }
		public long TotalBillableRequests { get; set; }
		public double Availability { get; set; }
		public double AverageE2ELatency { get; set; }
		public double AverageServerLatency { get; set; }
		public double PercentSuccess { get; set; }
		public double PercentThrottlingError { get; set; }
		public double PercentTimeoutError { get; set; }
		public double PercentServerOtherError { get; set; }
		public double PercentClientOtherError { get; set; }
		public double PercentAuthorizationError { get; set; }
		public double PercentNetworkError { get; set; }
		public long Success { get; set; }
		public long AnonymousSuccess { get; set; }
		public long SASSuccess { get; set; }
		public long ThrottlingError { get; set; }
		public long AnonymousThrottlingError { get; set; }
		public long SASThrottlingError { get; set; }
		public long ClientTimeoutError { get; set; }
		public long AnonymousClientTimeoutError { get; set; }
		public long SASClientTimeoutError { get; set; }
		public long ServerTimeoutError { get; set; }
		public long AnonymousServerTimeoutError { get; set; }
		public long SASServerTimeoutError { get; set; }
		public long ClientOtherError { get; set; }
		public long AnonymousClientOtherError { get; set; }
		public long SASClientOtherError { get; set; }
		public long ServerOtherError { get; set; }
		public long AnonymousServerOtherError { get; set; }
		public long SASServerOtherError { get; set; }
		public long AuthorizationError { get; set; }
		public long AnonymousAuthorizationError { get; set; }
		public long SASAuthorizationError { get; set; }
		public long NetworkError { get; set; }
		public long AnonymousNetworkError { get; set; }
		public long SASNetworkError { get; set; }
	}
}
